package de.steric.battlemon.collision;

import java.util.ArrayList;

import de.steric.battlemon.Battlemon;
import de.steric.battlemon.GameObject;

public class CollisionDetection {
	public collisionGroup collisionTree;

	public CollisionDetection() {
		recreate();
	}

	private void recreate() {
		collisionTree = new CollisionOverGroup();
		GameObject zero = Battlemon.battlemon.getSzene();
		ArrayList<ArrayList> allArrays = new ArrayList<ArrayList>();
		zero.addChildren(allArrays);
		for (ArrayList<GameObject> under : allArrays) {
			for (GameObject current : under) {
				if(current.collider!=null){
					collisionTree.addItem(current);
				}
			}
		}
	}
}
